
#include <bits/stdc++.h>

using namespace std;
#define int long long
typedef pair<int, int> PII;
#define x first
#define y second
const int N = 1e5 + 10;

int n, ans, b[N], cnt;
int a[N], o[N];
PII c[N];
int st[N];

bool cmp(PII x, PII y)
{
	return x.x > y.x;
}

signed main()
{
	freopen("duel.in", "r", stdin);
	freopen("duel.out", "w", stdout);
	ios::sync_with_stdio(false);
	cin >> n;
	ans = n;
	for (int i = 0; i < n; i ++ )
	{
		cin >> o[i];
		if (!b[o[i]]) a[cnt ++ ] = o[i];
		b[o[i]] ++ ;
	}
	for (int i = 0, k = 0; i < n; i ++ )
	{
		int t = a[k ++ ];
		c[k - 1].x = t, c[k - 1].y = b[t];
	}
	sort(a, a + n), sort(c, c + n, cmp);
	for (int i = 0; i < n; i ++ )
	{
		int f = 1;
		for (int j = 0; j < cnt && f; j ++ )
		{
			if (o[i] > c[j].x && c[j].y >= 1)
			{
				//cout << o[i] << ' ' << c[j].x << c[j].y << endl;
				c[j].y -= 1;
				ans -- ;
				f = 0;
			}
		}
	}
	cout << ans << endl;
	
	return 0;
}
